package com.company.cloud.club.modules.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.company.cloud.club.modules.db.dao.CollectionMapper;
import com.company.cloud.club.modules.db.domain.Collection;
import com.company.cloud.club.modules.service.CollectionService;
import com.company.cloud.club.modules.vo.PersonVo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * *****************************************************************************
 * <p>
 * 功能名           ：
 * 系统名           ：
 * <p>
 * *****************************************************************************
 * Modification History
 * <p>
 * Date        Name                    Reason for Change
 * ----------  ----------------------  -----------------------------------------
 * 2020/7/18     zhangxu                 Created
 */
@Service
public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collection> implements CollectionService {

    @Override
    public List<Collection> getCollectionList(Integer userId, String type) {
        return baseMapper.selectCollectionList(userId, type);
    }

    @Override
    public Collection getByResId(String type, String resId, Integer userId) {
        return baseMapper.selectByResId(type, resId, userId);
    }

    @Override
    public boolean removeByResId(String id) {
        return baseMapper.deleteByResId(id);
    }

    @Override
    public Integer countNum(String type, String resId) {
        return baseMapper.countNum(type, resId);
    }

    @Override
    public Boolean isColled(String resId, Integer userId) {
        return null != baseMapper.isColled(resId, userId);
    }

    @Override
    public Integer countFunsNum(String userId) {
        return baseMapper.countNum("user", userId);
    }

    @Override
    public Integer countRecomNum(Integer userId) {
        return baseMapper.countRecomNum(userId);
    }

    @Override
    public PersonVo artistInfoName(Integer userId) {
        return baseMapper.artistInfoName(userId);
    }

    @Override
    public Integer followInfoNum(Integer userId) {
        return baseMapper.followInfoNum(userId);
    }

    @Override
    public Integer followInfoFsNum(String objNo) {
        return baseMapper.followInfoFsNum(objNo);
    }

}